package com.ruoyi.project.records.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.framework.web.domain.BaseEntity;
import io.swagger.models.auth.In;
import net.sf.jsqlparser.expression.DateTimeLiteralExpression;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.Objects;
import com.ruoyi.framework.web.domain.BaseEntity;
import io.swagger.models.auth.In;
import net.sf.jsqlparser.expression.DateTimeLiteralExpression;

import java.util.Objects;

public class DrugSale extends BaseEntity {
    private Integer drugId;
    private String drugName;
    private Double drugPrice;
    private int salesNum;
    private Double salesAllMoney;
    private Double drugRxPrice;
    private int drugAmount;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date creationTime;

    public DrugSale() {
    }

    @Override
    public String toString() {
        return "DrugSale{" +
                "drugId=" + drugId +
                ", drugName='" + drugName + '\'' +
                ", drugPrice=" + drugPrice +
                ", salesNum=" + salesNum +
                ", salesAllMoney=" + salesAllMoney +
                ", drugRxPrice=" + drugRxPrice +
                ", drugAmount=" + drugAmount +
                ", creationTime=" + creationTime +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DrugSale drugSale = (DrugSale) o;
        return salesNum == drugSale.salesNum && drugAmount == drugSale.drugAmount && Objects.equals(drugId, drugSale.drugId) && Objects.equals(drugName, drugSale.drugName) && Objects.equals(drugPrice, drugSale.drugPrice) && Objects.equals(salesAllMoney, drugSale.salesAllMoney) && Objects.equals(drugRxPrice, drugSale.drugRxPrice) && Objects.equals(creationTime, drugSale.creationTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(drugId, drugName, drugPrice, salesNum, salesAllMoney, drugRxPrice, drugAmount, creationTime);
    }

    public Integer getDrugId() {
        return drugId;
    }

    public void setDrugId(Integer drugId) {
        this.drugId = drugId;
    }

    public String getDrugName() {
        return drugName;
    }

    public void setDrugName(String drugName) {
        this.drugName = drugName;
    }

    public Double getDrugPrice() {
        return drugPrice;
    }

    public void setDrugPrice(Double drugPrice) {
        this.drugPrice = drugPrice;
    }

    public int getSalesNum() {
        return salesNum;
    }

    public void setSalesNum(int salesNum) {
        this.salesNum = salesNum;
    }

    public Double getSalesAllMoney() {
        return salesAllMoney;
    }

    public void setSalesAllMoney(Double salesAllMoney) {
        this.salesAllMoney = salesAllMoney;
    }

    public Double getDrugRxPrice() {
        return drugRxPrice;
    }

    public void setDrugRxPrice(Double drugRxPrice) {
        this.drugRxPrice = drugRxPrice;
    }

    public int getDrugAmount() {
        return drugAmount;
    }

    public void setDrugAmount(int drugAmount) {
        this.drugAmount = drugAmount;
    }

    public Date getCreationTime() {
        return creationTime;
    }

    public void setCreationTime(Date creationTime) {
        this.creationTime = creationTime;
    }

    public DrugSale(Integer drugId, String drugName, Double drugPrice, int salesNum, Double salesAllMoney, Double drugRxPrice, int drugAmount, Date creationTime) {
        this.drugId = drugId;
        this.drugName = drugName;
        this.drugPrice = drugPrice;
        this.salesNum = salesNum;
        this.salesAllMoney = salesAllMoney;
        this.drugRxPrice = drugRxPrice;
        this.drugAmount = drugAmount;
        this.creationTime = creationTime;
    }
}
